package com.qg.utils;

/***
 * 常量类
 */
public class Constants {
    public static final String USER_USERANDPASS_ERROR="10000";//用户和密码出错
    public static final String SYSTEM_BUSY="1";//系统繁忙，请重试！
    public static final String USER_ERROR="10001";//登录出错！
    public static final String TOKEN_ERROR="10002";//保存token出错
    //60*60=一小时3600秒
    public static final Long TOKEN_TIMEOUT=60*60*2L;//token超时有效代码


    public static final String tokenPrefix="token:";//保存token的前缀

    public static final String goodsPrefix="goods:";//保存商品的前缀

    public static final String USER_LOGIN_LOSE="10003";//用户失效



    /*
   库存常量值
    */
    public static final class StockStatus{
        public static final Integer lock=0;
        public static final Integer paySuccess=1;
        public static final Integer payOverTime=2;
    }

    /*
    线程锁常量值
     */
    public static final class Lock{
        public static final String lockPrefix="lock:";
        public static final Long outTime=30L;

    }

    /*
    抢购商品用户常量值
     */
    public static final class QGUser{
        public static final String QGUserPrefix="QGUser:";//保存抢购过的用户的前缀
        public static final String QGUserSucceed="1";//保存抢购成功的用户标识值
        public static final String QGUserStockNull="0";//仓库空
        public static final String QGUser="2";//抢购过
        public static final String QGUserError="3";//抢购用户id无
    }

    /*
    抢购的消息定义
     */
    public static final class ActiveMQMassage{
        public static final String Distnection="QG-MASSAGE";//消息中间件地址标识

    }

    //订单状态0:待支付1:支付成功2:支付失败
    public static final class OrderStatus {
        public static final Integer toPay = 0;
        public static final Integer paySuccess = 1;
        public static final Integer payFail = 2;
    }
    public static final class PayMethod{
        public static final Integer aliPay=1;
        public static final Integer wxPay=2;

    }
    }
